package bank.service.impl;

import bank.pojo.Account;

import java.util.List;

public interface AccountService {

    /**
     * 开户
     * @param act
     * @return
     */
    int save(Account act);

    /**
     * 销户
     * @param actno
     * @return
     */
    int deleteByAct(String actno);

    /**
     * 修改账户
     * @param act
     * @return
     */
    int modifyByActno(Account act);

    /**
     * 查询账户
     * @param actno
     * @return
     */
    Account getByActno(String actno);

    /**
     * 查询所有账户
     * @return
     */
    List<Account> getAll();

    /**
     * 转账
     * @param fromAct
     * @param toAct
     * @param moneny
     */
    void transfer(String fromAct,String toAct,double moneny);
}
